package PL.prac6;

import java.io.IOException;

import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;


/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args ) throws IOException
    {
    	if (args.length != 0) {
			ANTLRFileStream ent = new ANTLRFileStream(args [0]);
			XMLLexer analex =new XMLLexer(ent);
			CommonTokenStream tokens = new CommonTokenStream(analex);
			XMLParser anasin = new XMLParser(tokens);
			try {
				anasin.entrada();
			} catch (RecognitionException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		else {
			System.out.println("Error, especificar fichero de entrada");
		}
    }
}
